package cn.tedu.spring.diobj;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestEmp {
    @Test
    public void Testemp() {
        ApplicationContext context = new ClassPathXmlApplicationContext
                ("bean-diobj.xml");
        Emp emp = context.getBean("emp1", Emp.class);
        System.out.println(emp);
    }

    @Test
    public void Testemp2() {
        ApplicationContext context = new ClassPathXmlApplicationContext
                ("bean-diobj.xml");
        Emp emp = context.getBean("emp2", Emp.class);
        System.out.println(emp);
    }

    @Test
    public void Testemp3() {
        ApplicationContext context = new ClassPathXmlApplicationContext
                ("bean-diobj.xml");
        Emp emp = context.getBean("emp3", Emp.class);
        System.out.println(emp);
    }
}
